package com.cjxt.ams.domain;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author fangzhiyu
 * @version V1.0
 * @Description:
 * @className: TreeNode
 * @date 2021/12/8 14:37
 * @company:华勤技术股份有限公司
 * @copyright: Copyright (c) 2021
 */

@Data
public class TreeNode {

    private Integer id;

    //名称
    private String label;

    /**
     * @description: 级别，用于识别在树形结构归属问题
     * @author fangzhiyu
     * @date 2021/12/8 15:05
     * @param null
     */
    private Integer pid;

    private List<TreeNode> children = new ArrayList<>();

    public TreeNode(Integer id, String label, Integer pid, List<TreeNode> list) {
        this.id = id;
        this.label = label;
        this.pid = pid;
        this.children = list;
    }
}